//
//  KCHBaseVC.m
//  Jade
//
//  Created by king on 2017/7/19.
//  Copyright © 2017年 KC. All rights reserved.
//

#import "KCHBaseVC.h"

@interface KCHBaseVC ()

@end

@implementation KCHBaseVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)showUpdate:(NSString *)str{
    
    UIAlertController * alertController = [UIAlertController alertControllerWithTitle:@"更新" message:str preferredStyle:UIAlertControllerStyleAlert];
    UIAlertAction *actionSure = [UIAlertAction actionWithTitle:@"更新"
                                                         style:UIAlertActionStyleDefault                                                      handler:^(UIAlertAction * _Nonnull action) {
                                                             
                                                             [ShareApplication openURL:[NSURL URLWithString:APP_STORE]];
                                                             
                                                             
                                                         }];
    [alertController addAction:actionSure];
    UIAlertAction *actionCancel = [UIAlertAction actionWithTitle:@"稍后再说"
                                                           style:UIAlertActionStyleDefault                                                      handler:^(UIAlertAction * _Nonnull action) {
                                                               
                                                           }];
    [alertController addAction:actionCancel];
    [self presentViewController:alertController animated:YES completion:nil];
    
}

- (void)showUpdateMust:(NSString *)str{
    
    UIAlertController * alertController = [UIAlertController alertControllerWithTitle:@"更新" message:str preferredStyle:UIAlertControllerStyleAlert];
    UIAlertAction *actionSure = [UIAlertAction actionWithTitle:@"更新"
                                                         style:UIAlertActionStyleDefault                                                      handler:^(UIAlertAction * _Nonnull action) {
                                                             
                                                             [ShareApplication openURL:[NSURL URLWithString:APP_STORE]];
                                                             
                                                         }];
    [alertController addAction:actionSure];
    [self presentViewController:alertController animated:YES completion:nil];
    
}

@end
